<template>
  <div class="bot-bar">
    <div class="left-bar">
      <div class="service">
        <span class="icon kefu"></span>
        <p>客服</p>
      </div>
      <div class="service">
        <span class="icon shop"></span>
        <p>店铺</p>
      </div>
      <div class="service">
        <span class="icon collect"></span>
        <p>收藏</p>
      </div>
    </div>
    <div class="right-bar">
      <div class="addcart" @click="addCart">加入购物车</div>
      <div class="buy">购买</div>
    </div>
  </div>
</template>

<script>
export default {
  name: "DetailBotbar",
  methods: {
    addCart() {
      this.$emit("addCart");
    },
  },
};
</script>

<style scoped>
.bot-bar {
  height: 58px;
  background: #fff;
  position: fixed;
  left: 0;
  right: 0;
  bottom: -1px;
  display: flex;
  justify-content: space-between;
}
.left-bar {
  width: 50%;
  background: #fff;
  display: flex;
  padding-left: 25px;
  margin-top: 6px;
  font-size: 15px;
}
.service {
  width: 33.3%;
}
.icon {
  display: block;
  width: 32px;
  height: 32px;
  background: url("~assets/img/detail/detail_bottom.png") no-repeat 0 0/100%;
}
.kefu {
  background-position: 0 -78px;
}
.shop {
  background-position: 0 -145px;
}

.right-bar {
  width: 50%;
  display: flex;
}
.addcart {
  width: 50%;
  background: yellow;
  text-align: center;
  line-height: 58px;
}
.buy {
  width: 50%;
  background: var(--color-tint);
  text-align: center;
  line-height: 58px;
  color: #fff;
}
</style>
